/*******************************************************************************
Paper: Does the Production Approach to Markup Estimation Match a Stylized Fact?
Description: Produces Figure 1c
Author: Tove Forsbacka
Last Updated: 15 February 2026
*******************************************************************************/

* Setup and environment control 
clear
set more off
capture log close 
version 18.5
*ssc install did_multiplegt_dyn

* Define path and load data
*cd "PROJECT_PATH"
use "markups_shock.dta"

* Set panel
xtset localmarket year

* Define control variables
local controls "lpopulation_density lincome"

* Figure 1c: Shock
did_multiplegt_dyn markup_mean Kommunkod year maxientry, cluster(Kommunkod) /// 
controls(`controls') effects(4) placebo(2)   graphoptions(ylabel(-0.05(0.025)0.05, ///
 angle(0) grid glcolor(dimgray)) xlabel(-2(1)4)  yline(0.05, lstyle(grid) ///
 lcolor(dimgray))  yline(-0.05, lstyle(grid) lcolor(dimgray)) scheme(s2mono) ///
 graphregion(color(white)) bgcolor(white) legend(off) ytitle() xtitle(Time to treatment))
graph export 1c_shock.pdf, replace

